<!DOCTYPE html>
<html lang="en">
  <head>
    <title>ContinuousSortFunction Struct Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a name="//apple_ref/swift/Struct/ContinuousSortFunction" class="dashAnchor"></a>
    <a title="ContinuousSortFunction Struct Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">Spruce Docs</a> (100% documented)</p>
        <p class="header-right"><a href="https://github.com/willowtreeapps/spruce-ios"><img src="../img/gh.png"/>View on GitHub</a></p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">Spruce Reference</a>
        <img id="carat" src="../img/carat.png" />
        ContinuousSortFunction Struct Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/Button.html">Button</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ViewController.html">ViewController</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Enums.html">Enums</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Enums/Angle.html">Angle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Corner.html">Corner</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Direction.html">Direction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Distance.html">Distance</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Position.html">Position</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Scale.html">Scale</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/SlideDirection.html">SlideDirection</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/StockAnimation.html">StockAnimation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Weight.html">Weight</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions/CGPoint.html">CGPoint</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIView.html">UIView</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/Animation.html">Animation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/CornerSortFunction.html">CornerSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/DirectionSortFunction.html">DirectionSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/DistanceSortFunction.html">DistanceSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/PositionSortFunction.html">PositionSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/SortFunction.html">SortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/View.html">View</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/WeightSortFunction.html">WeightSortFunction</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Structs.html">Structs</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Structs/ContinuousSortFunction.html">ContinuousSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ContinuousWeightedSortFunction.html">ContinuousWeightedSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/CorneredSortFunction.html">CorneredSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/DefaultSortFunction.html">DefaultSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/InlineSortFunction.html">InlineSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LinearSortFunction.html">LinearSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/RadialSortFunction.html">RadialSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/RandomSortFunction.html">RandomSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SpringAnimation.html">SpringAnimation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/Spruce.html">Spruce</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SprucePoint.html">SprucePoint</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SpruceUIView.html">SpruceUIView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/StandardAnimation.html">StandardAnimation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs.html#/s:V6Spruce9TimedView">TimedView</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>ContinuousSortFunction</h1>
              <div class="declaration">
                <div class="language">
                  <pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">ContinuousSortFunction</span><span class="p">:</span> <span class="kt"><a href="../Protocols/PositionSortFunction.html">PositionSortFunction</a></span></code></pre>

                </div>
              </div>
            <p>A <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> that has variable <code>interObjectDelay</code> values. Unlike other <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> implementations, for the <code>ContinuousSortFunction</code> you specify a <code>duration</code> and the <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> will compute the necessary <code>interObjectDelay</code> values for each of the subviews. This means that the offset times will not be multiples of the delay like usual.
- Note: Though <code>interObjectDelay</code> is a value on this sort function, it will not be used.
- Note: The delay values used will be calculated and relative based on how far those views are from the selected position. This means that the animation will look a little smoother if you are using it with large scale numbers of <code>subviews</code>.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vP6Spruce20DistanceSortFunction16interObjectDelaySd"></a>
                    <a name="//apple_ref/swift/Property/interObjectDelay" class="dashAnchor"></a>
                    <a class="token" href="#/s:vP6Spruce20DistanceSortFunction16interObjectDelaySd">interObjectDelay</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> that has variable <code>interObjectDelay</code> values. Unlike other <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> implementations, for the <code>ContinuousSortFunction</code> you specify a <code><a href="../Structs/ContinuousSortFunction.html#/s:vV6Spruce22ContinuousSortFunction8durationSd">duration</a></code> and the <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> will compute the necessary <code>interObjectDelay</code> values for each of the subviews. This means that the offset times will not be multiples of the delay like usual.
- Note: Though <code>interObjectDelay</code> is a value on this sort function, it will not be used.
- Note: The delay values used will be calculated and relative based on how far those views are from the selected position. This means that the animation will look a little smoother if you are using it with large scale numbers of <code>subviews</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">interObjectDelay</span><span class="p">:</span> <span class="kt">TimeInterval</span> <span class="o">=</span> <span class="mf">0.0</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vV6Spruce22ContinuousSortFunction8durationSd"></a>
                    <a name="//apple_ref/swift/Property/duration" class="dashAnchor"></a>
                    <a class="token" href="#/s:vV6Spruce22ContinuousSortFunction8durationSd">duration</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">ContinuousSortFunction</span><span class="p">:</span> <span class="kt"><a href="../Protocols/PositionSortFunction.html">PositionSortFunction</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vP6Spruce20PositionSortFunction8positionOS_8Position"></a>
                    <a name="//apple_ref/swift/Property/position" class="dashAnchor"></a>
                    <a class="token" href="#/s:vP6Spruce20PositionSortFunction8positionOS_8Position">position</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> that has variable <code><a href="../Structs/ContinuousSortFunction.html#/s:vP6Spruce20DistanceSortFunction16interObjectDelaySd">interObjectDelay</a></code> values. Unlike other <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> implementations, for the <code>ContinuousSortFunction</code> you specify a <code><a href="../Structs/ContinuousSortFunction.html#/s:vV6Spruce22ContinuousSortFunction8durationSd">duration</a></code> and the <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> will compute the necessary <code><a href="../Structs/ContinuousSortFunction.html#/s:vP6Spruce20DistanceSortFunction16interObjectDelaySd">interObjectDelay</a></code> values for each of the subviews. This means that the offset times will not be multiples of the delay like usual.
- Note: Though <code><a href="../Structs/ContinuousSortFunction.html#/s:vP6Spruce20DistanceSortFunction16interObjectDelaySd">interObjectDelay</a></code> is a value on this sort function, it will not be used.
- Note: The delay values used will be calculated and relative based on how far those views are from the selected position. This means that the animation will look a little smoother if you are using it with large scale numbers of <code>subviews</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">position</span><span class="p">:</span> <span class="kt"><a href="../Enums/Position.html">Position</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vP6Spruce20DistanceSortFunction8reversedSb"></a>
                    <a name="//apple_ref/swift/Property/reversed" class="dashAnchor"></a>
                    <a class="token" href="#/s:vP6Spruce20DistanceSortFunction8reversedSb">reversed</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> that has variable <code><a href="../Structs/ContinuousSortFunction.html#/s:vP6Spruce20DistanceSortFunction16interObjectDelaySd">interObjectDelay</a></code> values. Unlike other <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> implementations, for the <code>ContinuousSortFunction</code> you specify a <code><a href="../Structs/ContinuousSortFunction.html#/s:vV6Spruce22ContinuousSortFunction8durationSd">duration</a></code> and the <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> will compute the necessary <code><a href="../Structs/ContinuousSortFunction.html#/s:vP6Spruce20DistanceSortFunction16interObjectDelaySd">interObjectDelay</a></code> values for each of the subviews. This means that the offset times will not be multiples of the delay like usual.
- Note: Though <code><a href="../Structs/ContinuousSortFunction.html#/s:vP6Spruce20DistanceSortFunction16interObjectDelaySd">interObjectDelay</a></code> is a value on this sort function, it will not be used.
- Note: The delay values used will be calculated and relative based on how far those views are from the selected position. This means that the animation will look a little smoother if you are using it with large scale numbers of <code>subviews</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">reversed</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FV6Spruce22ContinuousSortFunctioncFT8positionOS_8Position8durationSd_S0_"></a>
                    <a name="//apple_ref/swift/Method/init(position:duration:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FV6Spruce22ContinuousSortFunctioncFT8positionOS_8Position8durationSd_S0_">init(position:duration:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">ContinuousSortFunction</span><span class="p">:</span> <span class="kt"><a href="../Protocols/PositionSortFunction.html">PositionSortFunction</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FP6Spruce12SortFunction11timeOffsetsFT4viewCSo6UIView14recursiveDepthSi_GSaVS_9TimedView_"></a>
                    <a name="//apple_ref/swift/Method/timeOffsets(view:recursiveDepth:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FP6Spruce12SortFunction11timeOffsetsFT4viewCSo6UIView14recursiveDepthSi_GSaVS_9TimedView_">timeOffsets(view:recursiveDepth:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> that has variable <code><a href="../Structs/ContinuousSortFunction.html#/s:vP6Spruce20DistanceSortFunction16interObjectDelaySd">interObjectDelay</a></code> values. Unlike other <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> implementations, for the <code>ContinuousSortFunction</code> you specify a <code><a href="../Structs/ContinuousSortFunction.html#/s:vV6Spruce22ContinuousSortFunction8durationSd">duration</a></code> and the <code><a href="../Protocols/SortFunction.html">SortFunction</a></code> will compute the necessary <code><a href="../Structs/ContinuousSortFunction.html#/s:vP6Spruce20DistanceSortFunction16interObjectDelaySd">interObjectDelay</a></code> values for each of the subviews. This means that the offset times will not be multiples of the delay like usual.
- Note: Though <code><a href="../Structs/ContinuousSortFunction.html#/s:vP6Spruce20DistanceSortFunction16interObjectDelaySd">interObjectDelay</a></code> is a value on this sort function, it will not be used.
- Note: The delay values used will be calculated and relative based on how far those views are from the selected position. This means that the animation will look a little smoother if you are using it with large scale numbers of <code>subviews</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">timeOffsets</span><span class="p">(</span><span class="nv">view</span><span class="p">:</span> <span class="kt">UIView</span><span class="p">,</span> <span class="nv">recursiveDepth</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">[</span><span class="kt"><a href="../Structs.html#/s:V6Spruce9TimedView">TimedView</a></span><span class="p">]</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>view</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>the view whose subviews should be animated. This view should not be included in the returned array</p>

                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>recursiveDepth</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>an int describing how deep into the view hiearchy the subview search should go, defaults to 0. A value of 0 is the same as calling the <code>subviews</code> on the actual view itself. Therefore a depth of 1 will be getting the subviews of each of the subviews, etc…</p>

                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>an array of <code><a href="../Structs.html#/s:V6Spruce9TimedView">TimedView</a></code>’s which contain references to the view needed to be animated and the time offset for when the animation of that individual view should start relative to the start of the overall animation</p>

                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2017 <a class="link" href="https://willowtreeapps.com" target="_blank" rel="external">WillowTree</a>. All rights reserved. (Last updated: 2017-03-10)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
